import request from '../../utils/httpRequest'

const purchasedetail = '/ware/ware/purchasedetail'

// 查询list
export function getPurchaseDetailList (param) {
  return request({
    url: `${purchasedetail}/list`,
    method: 'get',
    param
  })
}

// 根据ids批量删除
export function deletePurchaseDetailByIds (data) {
  return request({
    url: `${purchasedetail}/delete`,
    method: 'delete',
    data
  })
}

// 根据id查询
export function getPurchaseDetailById (id) {
  return request({
    url: `${purchasedetail}/info/${id}`,
    method: 'get'
  })
}

// 新增
export function savePurchaseDetail (data) {
  return request({
    url: `${purchasedetail}/save`,
    method: 'post',
    data
  })
}

// 修改
export function updatePurchaseDetail (data) {
  return request({
    url: `${purchasedetail}/update`,
    method: 'put',
    data
  })
}
